<template>
	<view>
		<view class="recommond-title">

			<h3>{{text}}</h3>
			<view class="right" @click="goUrl(url)">
				<text>更多</text>
				<image class="more" src="../static/img/more.png" mode=""></image>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		name: "titleBar",
		data() {
			return {

			};
		},

		props: {
			text: {
				type: String,
			},
			url: {
				type: String,
			}
		},
		methods: {
			goUrl(url) {
				uni.switchTab({ url })
			}
		}
	}

</script>

<style lang="scss">
	.recommond-title {
		width: 100%;
		height: 22px;
		display: flex;
		justify-content: space-between;
		line-height: 22px;
		position: relative;

		&::before {
			content: '';
			position: absolute;
			width: 3px;
			height: 18px;
			top: 2px;
			background: rgb(118, 118, 238);
			border-radius: 8px;
		}

		h3 {
			margin-left: 8px;
			font-size: 16px;
		}

		.right {
			display: flex;
			align-items: center;
			color: rgb(170, 170, 170);
			font-size: 14px;
		}



		.more {
			width: 16px;
			height: 16px;
		}
	}

</style>

